import 'package:wanxiang_app/generated/json/base/json_field.dart';
import 'package:wanxiang_app/generated/json/kan_list_entity.g.dart';
import 'dart:convert';

@JsonSerializable()
class KanListEntity {
	late int code;
	late String msg;
	late List<KanListData> data;

	KanListEntity();

	factory KanListEntity.fromJson(Map<String, dynamic> json) => $KanListEntityFromJson(json);

	Map<String, dynamic> toJson() => $KanListEntityToJson(this);

	@override
	String toString() {
		return jsonEncode(this);
	}
}

@JsonSerializable()
class KanListData {
	late int id;
	@JSONField(name: "channel_id")
	late int channelId;
	@JSONField(name: "goods_id")
	late int goodsId;
	@JSONField(name: "bargaining_userid")
	late int bargainingUserid;
	@JSONField(name: "bargaining_time")
	late String bargainingTime;
	@JSONField(name: "old_price")
	late String oldPrice;
	@JSONField(name: "new_price")
	late String newPrice;
	@JSONField(name: "deposit_price")
	late String depositPrice;
	@JSONField(name: "is_bflag")
	late int isBflag;
	@JSONField(name: "offer_price")
	late String offerPrice;
	@JSONField(name: "seller_id")
	late int sellerId;
	@JSONField(name: "is_payment")
	late int isPayment;
	@JSONField(name: "is_istatus")
	late int isIstatus;
	@JSONField(name: "goods_guid")
	late String goodsGuid;
	late String title;
	@JSONField(name: "img_url")
	late String imgUrl;
	@JSONField(name: "is_msg")
	late int isMsg;
	@JSONField(name: "is_indulge")
	late int isIndulge;
	@JSONField(name: "category_text")
	late String categoryText;
	@JSONField(name: "reality_price")
	late String realityPrice;

	KanListData();

	factory KanListData.fromJson(Map<String, dynamic> json) => $KanListDataFromJson(json);

	Map<String, dynamic> toJson() => $KanListDataToJson(this);

	@override
	String toString() {
		return jsonEncode(this);
	}
}